<!DOCTYPE html>
<!--<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">-->
<link rel="stylesheet" href="../css/bootstrap.min.css">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    $(document).ready(function () {
        var flag = 0;
        $("#zzty1").click(function () {
            $("#selfexam").show();
            $("#teamexam").hide();
        })
        $("#zzty3").click(function () {
            $("#selfexam").hide();
            $("#teamexam").show();
        });

        $("#teacher1").click(function () {
            $("#question").show();
            $("#selfgrade").hide();
            $("#teamgrade").hide();
            $("#fenzu").hide();
            $("#Placement").hide();

        });
        $("#teacher2").click(function () {
            flag = 1;
            $("#question").hide();
            $("#selfgrade").show();
            $("#teamgrade").hide();
            $("#fenzu").hide();
            $("#Placement").hide();
        });
        $("#teacher3").click(function () {
            flag = 2;
            $("#question").hide();
            $("#selfgrade").hide();
            $("#teamgrade").show();
            $("#fenzu").hide();
            $("#Placement").hide();

        });

        $("#teacher4").click(function () {
            $("#fenzu").show();
            $("#question").hide();
            $("#selfgrade").hide();
            $("#teamgrade").hide();
            $("#Placement").hide();
        });


        $("#teacher5").click(function () {
            $("#fenzu").hide();
            $("#question").hide();
            $("#selfgrade").hide();
            $("#teamgrade").hide();
            $("#Placement").show();
        });


        $("#selfexaminputfile").change(function () {
            var tmp1 = document.getElementById("selfexaminputfile").value;
            if (document.getElementById("selfexaminputfile").value != "" && checkFile(tmp1)) {
                document.getElementById("selfexamb1").value = "提交";
                document.getElementById("selfexamb1").disabled = "";
            } else {
                document.getElementById("selfexamb1").value = "请选择文件";
                document.getElementById("selfexamb1").disabled = "true";
            }
        });
        $("#teamexaminputfile").change(function () {
            var tmp2 = document.getElementById("teamexaminputfile").value;

            if (document.getElementById("teamexaminputfile").value != "" && checkFile(tmp2)) {
                document.getElementById("teamfexamb1").value = "提交";
                document.getElementById("teamfexamb1").disabled = "";
            } else {
                document.getElementById("teamfexamb1").value = "请选择文件";
                document.getElementById("teamfexamb1").disabled = "true";
            }
        });


        function checkFile(str) {
            var pos = str.lastIndexOf('.zip');
            if (pos === -1) {
                return false;
            } else {
                return pos + 4 === str.length;
            }
        }

        function getTime() {
            var date = new Date().toLocaleString();
            $("#todaydate").val(date);
        }

        $(document).on("click", ".details", function () {
            var id = $(this).parent().parent().children().eq(0).html();
            if (flag == 1) {
                var date = $("#selfdate").val();
                window.open("StudentAnswer.html?id=" + id + "&date=" + date + "&operation=selfExam");
            } else if (flag == 2) {
                var date = $("#teamdate").val();
                window.open("StudentAnswer.html?id=" + id + "&date=" + date + "&operation=teamExam");
            }
//            var date = $(this).parent().parent().children().eq(1).html();
// 			window.open("https://www.baidu.com/");
        })
        setInterval(getTime, 0);
    })
</script>
<body ng-app="app">
<div id="Layer29" ng-controller="zzty">

    <!--二级div-->
    <div id="Layer27">
        <div id="Layer3">


        </div>
        <div id="Layer4">
            <div id="student" style="display: none">
                <button id="zzty1" class="zzty1">
                    <div class="zzty2" id="zzty2" ng-click="selfexam()">个人竞赛</div>
                </button>

                <button id="zzty3" class="zzty1">
                    <div class="zzty2" id="zzty4" ng-click="teamexam()">结对竞赛</div>
                </button>
            </div>
            <div id="teacher" style="display: none">
                <button class="zzty1" id="teacher1">
                    <div class="zzty2">竞赛布置</div>
                </button>
                <button class="zzty1" id="teacher2">
                    <div class="zzty2">竞赛批改</div>
                </button>
                <button class="zzty1" id="teacher3">
                    <div class="zzty2">结对批改</div>
                </button>
                <button class="zzty1" id="teacher4">
                    <div class="zzty2">结对分组</div>
                </button>
                <button class="zzty1" id="teacher5">
                    <div class="zzty2">班级划分</div>
                </button>
            </div>
        </div>
    </div>
    <!--二级div结束-->
    <!--三级div-->

    <div id="Layer30" style="overflow: hidden;">
        <div class="col-sm-offset-9 col-sm-2">
            <input id="todaydate" style="background: transparent; border: none;"
                   disabled="true"/>
        </div>
        <div id="selfexam" style="display: none;">
            <div class="row">
                <div class="col-md-12">
                    <h2>今日竞赛</h2>
                </div>
            </div>
            <hr/>
            <div id="selfexamdiv2">
                <div class="col-sm-offset-0 col-sm-12">
                        <textarea rows="12 " cols="99"
                                  style="background: transparent" disabled
                                  ng-bind="selfquestions"></textarea>
                </div>

                <div class="col-sm-offset-0 col-sm-12">
                    <h1>倒计时{{selfdescription}}</h1>
                </div>

                <!--<form id="selfexamform1" action="../SelfExamTransation/submit"-->
                <!--method="post" enctype="multipart/form-data">-->
                <!--<div class="col-sm-offset-6 col-sm-6">-->
                <!--<h3>-->
                <!--作业提交-->
                <!--</h3>-->
                <!--<input type="file" id="selfexaminputfile" name="selffileName" accept=".zip"><br/>-->
                <!--<input type="submit" class="btn btn-success" value="请选择文件" name="submit"-->
                <!--id="selfexamb1" disabled="true" onclick="submit1()"><br/>-->
                <!--<font color="#FF0000">Tip1:仅可提交一次，无法重复提交！</font><br/> <font-->
                <!--color="#FF0000">Tip2:仅可提交zip文件!</font>-->
                <!--</div>-->
                <!--</form>-->
                <!--<form id="selfexamform1" action="../SelfExamTransation/submit"-->
                <!--method="post" enctype="multipart/form-data">-->
                <div class="col-sm-offset-6 col-sm-6">
                    <h3>
                        作业提交
                    </h3>
                    <input type="file" id="selfexaminputfile" name="selffiles" accept=".zip"><br/>


                    <!--<div ng-if="$('#selfexaminputfile').val()">-->

                    <input type="submit" class="btn btn-success" value="请选择文件" name="submit"
                           id="selfexamb1" disabled="true" ng-click="selfsubmit()"><br/>

                    <!--</div>-->


                    <font color="#FF0000">Tip1:仅可提交一次，无法重复提交！</font><br/> <font
                        color="#FF0000">Tip2:仅可提交zip文件!</font>
                </div>
                <!--</form>-->
            </div>
            <!--</div>-->
        </div>


        <div id="teamexam" style="display: none;">
            <div class="row">
                <div class="col-md-12">
                    <h2>今日结对</h2>
                </div>
            </div>
            <hr/>
            <div id="teamexamdiv2">
                <div class="col-sm-offset-0 col-sm-12">
                        <textarea id="teamexamtarea1" rows="10" cols="99"
                                  style="background: transparent" disabled ng-bind="teamquestions"></textarea>
                </div>
                <div class="col-sm-offset-0 col-sm-12">
                    <h2>
                        你的队友为{{company}}
                    </h2>
                    <h1>倒计时{{teamdescription}}</h1>
                </div>

                <!--<form id="form1" role="form" action="../TeamExam/uploadFile" method="post"-->
                <!--enctype="multipart/form-data">-->
                <!--<div class="col-sm-offset-6 col-sm-6">-->
                <!--<h3>-->
                <!--作业提交-->
                <!--</h3>-->
                <!--<input type="file" id="teamexaminputfile" name="teamfileName" accept=".zip"> <br/>-->
                <!--<input type="submit" class="btn btn-success" value="请选择文件" name="submit"-->
                <!--id="teamfexamb1" disabled="ture" onclick="submit1()" ng-click="teamsubmit()"><br/>-->
                <!--<font color="#FF0000">Tip1:仅可提交一次，无法重复提交！</font><br/> <font-->
                <!--color="#FF0000">Tip2:仅可提交zip文件!</font>-->
                <!--</div>-->
                <!--</form>-->
                <!--<form id="form1" role="form" action="../TeamExam/uploadFile" method="post"-->
                <!--enctype="multipart/form-data">-->
                <div class="col-sm-offset-6 col-sm-6">
                    <h3>
                        作业提交
                    </h3>
                    <input type="file" id="teamexaminputfile" name="teamfiles" accept=".zip"> <br/>
                    <input type="submit" class="btn btn-success" value="请选择文件"
                           id="teamfexamb1" disabled="ture" ng-click="teamsubmit()"><br/>
                    <font color="#FF0000">Tip1:仅可提交一次，无法重复提交！</font><br/> <font
                        color="#FF0000">Tip2:仅可提交zip文件!</font>
                </div>
                <!--</form>-->
            </div>
        </div>

        <script type="text/javascript">
            var s = new Array();

            Date.prototype.format = function (fmt) {
                var o = {
                    "M+": this.getMonth() + 1, //月份
                    "d+": this.getDate(), //日
                    "h+": this.getHours(), //小时
                    "m+": this.getMinutes(), //分
                    "s+": this.getSeconds(), //秒
                    "q+": Math.floor((this.getMonth() + 3) / 3), //季度
                    "S": this.getMilliseconds() //毫秒
                };
                if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
                for (var k in o)
                    if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
                return fmt;
            }

            function setdate(date) {

                var day1 = new Date();
                day1.setDate(day1.getDate() + date);
                var s1 = day1.format("yyyy-MM-dd");
                $("#date1").val(s1)
                var date = $("#date1").val()
            }

            function deleteRow(row, array) {
                var i = row.parentNode.parentNode.rowIndex;
                document.getElementById("tquestions").deleteRow(i);
                var d = tableval(row, 1);
                var r = new Array();
                for (var i = 0, l = array.length; i < l; i++) {


                    if (JSON.stringify(array[i].val).substring(1, JSON.stringify(array[i].val).length - 1) != d) {

                        r.push(array[i]);
                    }
                }
                s = r;
            }

            function fenye(val) {
                $("#tablequestion").empty()

                $.getJSON("../que/fenye?num=" + val, function (result) {

                    $.each(result, function (i, field) {

                        $("#tablequestion").append("<tr><td><input type='checkbox' id='td1' value=" + field.id + ">" + field.id + "</td><td>" + field.content + "</td></tr>");

                    });


                });
            }

            //去重
            function uniqueList(array) {
                var r = [];
                for (var i = 0, l = array.length; i < l; i++) {
                    for (var j = i + 1; j < l; j++)
                        //关键在这里
                        if (JSON.stringify(array[i]) == JSON.stringify(array[j])) j = ++i;
                    r.push(array[i]);
                }
                return r;
            }

            function add(arr) {
                arr = uniqueList(arr);
                for (var i = 0; i < arr.length; i++) {
                    $("#tquestions").append("<tr><td style='display:none;'>" + arr[i].id + "</td>" + "<td>" + arr[i].val + "</td><td><input type='button'  onclick='deleteRow(this,s)' value='删除'></td></tr>");
                }
            }

            function tableval(column, column1) {
                //获取点击的一行tr
                var a = $(column).parent().parent();
                //获取tr的所有td元素
                var b = a.children("td");
                //取得第二列元素
                var c = b.eq(column1);
                //显示第二列的值
                var d = c.text();
                return d;
            }

            var Num = 0;
            $.getJSON("../que/AssginTask", function (result) {
                Num = result;
            });

            //设置时间
            setdate(0);
            $("#tomorrow").click(function () {

                setdate(1);
                $("#tomorrow").attr("class", "btn btn-default active")
                $("#today").attr("class", "btn btn-default")
            })
            $("#today").click(function () {
                setdate(0);

                $("#today").attr("class", "btn btn-default active")
                $("#tomorrow").attr("class", "btn btn-default")
            })
            $("body").on('click', '#tiku', function () {
                //清空分页
                $("#ul1").empty()

                //分页
                for (var i = 0; i < Num; i++) {
                    $("#ul1").append("<li><a id='a1' value=" + i + ">" + (i + 1) + "</a></li>")
                }

                fenye(0);
            })


            $("body").on('click', '#a1', function () {
                //分页*10来确定内容
                var val = parseInt($(this).attr("value")) * 10;
                fenye(val);
            })


            $("body").on('click', '#td1', function () {

                var d = tableval(this, 1);

                s.push({id: $(this).val(), val: d});
            });
            //模态框提交
            //tquestions-最终题目
            $("#tijiao1").click(function () {
                $("#tquestions").empty();
                $("#tquestions").append("<tr><th style='display:none;'>题号</th><th>题目</th><th>删除</th></tr>");


                add(s)


            })

            //添加题目 提交
            $("#tianjia").click(function () {
                if ($("#tquestion").val() == "") {
                    alert("不能为空")
                } else {
                    $("#tquestions").empty();
                    $("#tquestions").append("<tr><th style='display:none;'>题号</th><th>题目</th><th>删除</th></tr>");

                    s.push({id: "", val: $("#tquestion").val()});

                    add(s)
                    $("#tquestion").val("");

                }

            })

            $("#i1").click(function () {

                alert($("#optionsRadios1").is(":checked"))
            })
            //最终提交
            var Questions = "";
            var result = "";
            $("#tijiao").click(function () {
                if (date.length < 1) {

                    alert("请输入时间")

                } else {
                    s.forEach(function (item) {
                        if (item.id == "") {
                            result = result + item.val + "-";
                        }
                        else {
                            Questions = Questions + item.id + "%7C";
                        }
                    })
                    $.ajaxSettings.async = false;
                    Questions = Questions.substring(0, Questions.length - 3);
                    if ($("#optionsRadios1").is(":checked")) {
                        $.ajaxSettings.async = false;
                        $.getJSON("../que/insert?insert=insertteam&date=" + $("#date1").val() + "&content=" + result + "&Questions=" + Questions, function (result) {
                            alert("成功")

                        });
                        window.location.reload();
                    } else {
                        $.ajaxSettings.async = false;
                        $.getJSON("../que/insert?insert=insertself&date=" + $("#date1").val() + "&content=" + result + "&Questions=" + Questions, function (result) {
                            alert("成功")
                        });
                        window.location.reload();

                    }

                }
            })
        </script>
        <div id="question" style="display: none; overflow-x:hidden;height: 620px;width: 765px;">
            <form action="#" class="form-horizontal" role="form">
                <legend>布置作业</legend>
                <p>
                    <input type="date" id="date1">
                <div class="form-group">
                    <label class="col-md-2 control-label">结对/竞赛</label>
                    <div class="radio">
                        <label> <input type="radio" name="taskType" id="optionsRadios1" value="team"/>结对 </label>
                        <label> <input type="radio" name="taskType" value="self" checked/>竞赛
                        </label>
                    </div>

                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label">添加题目：</label>
                    <div class="form-group col-md-5">
										<textarea class="form-control" name="tquestion" id="tquestion"
                                                  rows="8"></textarea>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-2 control-label"></div>

                    <div class="form-group col-md-5">
                        <a class="btn  btn-default" role="button" id="tianjia">添加</a>
                        <a class="btn  btn-default" id="tiku" data-toggle="modal"
                           data-target="#myModal" role="button">题库</a>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label">最终题目：</label>
                    <div class="col-md-6">
                        <!--   Basic Table  -->
                        <div class="panel panel-default">

                            <div class="panel-body">
                                <div class="table-responsive">
                                    <table name="tableQuestions" class="table table-striped table-bordered table-hover"
                                           id="tquestions" style="word-break: break-all;">
                                        <tr>
                                            <th style="display:none;">题号</th>
                                            <th>题目</th>
                                            <th>删除</th>
                                        </tr>
                                        <tbody>


                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <input type="hidden" id="formQids" name="formQids"></input>
                <div class="form-group">
                    <div class="col-md-4 control-label"></div>
                    <div class="form-group col-md-5">
                        <button type="submit" id="tijiao"
                                class="btn btn-primary btn-default">提交
                        </button>
                    </div>
                </div>
                <input type="hidden" name="q_ids"></input>
            </form>
            <!-- 模态框（Modal） -->
            <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
                 aria-labelledby="myModalLabel" aria-hidden="true">
                <input type="hidden" id="hquesions"></input>
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"
                                    aria-hidden="true">×
                            </button>
                            <h4 class="modal-title" id="myModalLabel">题库</h4>
                        </div>
                        <div class="modal-body">


                            <div class="panel panel-default">
                                <div class="panel-heading"></div>
                                <div class="panel-body">
                                    <div class="table-responsive">
                                        <table
                                                class="table table-striped table-bordered table-hover"
                                                id="tablequestion">
                                            <!-- <thead>
                                                <tr>
                                                    <th></th>
                                                    <th>题目</th>

                                                </tr>
                                            </thead> -->

                                        </table>
                                    </div>

                                </div>
                                <div align="center">
                                    <ul class="pagination" id="ul1">
                                    </ul>
                                </div>


                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default"
                                        data-dismiss="modal">关闭
                                </button>
                                <button type="button" class="btn btn-primary"
                                        data-dismiss="modal" id="tijiao1">提交更改
                                </button>
                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                </div>
                <!-- /.modal -->


            </div>
        </div>


        <div id="selfgrade" style="display: none;" ng-controller="selfgrade">

            <div class="col-md-12">
                <h2>个人竞赛作业批改</h2>
                <h5></h5>
                <p>
                    日期：<input type="date" id="selfdate" ng-model="selfdate"/>
                    <input type="button" id="selfsearch" value="查找" ng-click="selfsearch()"/>
                </p>


                <div class="row" style="padding: 50px 20px 0px 20px">
                     							<textarea id="selftarea" rows="10" cols="99"
                                                          style="background: transparent" disabled>{{wpmagazine[0].question}}</textarea>
                    <div class="table-responsive">
                        <table class="table table-striped" id="selftable"
                               style="text-align: center">
                            <thead>
                            <tr>
                                <th style="text-align: center">ID</th>
                                <th style="text-align: center">姓名</th>
                                <th style="text-align: center">用时(min)</th>
                                <th style="text-align: center">评分</th>
                                <th style="text-align: center">进行评价</th>

                            </tr>
                            </thead>
                            <tbody id="selftablebody">
                            <tr ng-repeat="item in wpmagazine">
                                <td>{{item.userId}}</td>
                                <td>{{item.stuName}}</td>
                                <td>{{item.totalTime}}</td>
                                <td>{{item.score}}</td>
                                <td>
                                    <button class='details'>详情</button>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <div id="teamgrade" style="display: none;" ng-controller="teamgrade">

            <div class="col-md-12">
                <h2>结对竞赛作业批改</h2>
                <h5></h5>
                <p>
                    日期：<input type="date" id="teamdate" ng-model="teamdate"/>
                    <input type="button" value="查找" ng-click="teamsearch()"/>
                </p>


                <div class="row" style="padding: 50px 20px 0px 20px">
                     							<textarea id="teamtarea" rows="10" cols="99"
                                                          style="background: transparent" disabled>{{wpmagazine[0].qstContent}}</textarea>
                    <div class="table-responsive">
                        <table class="table table-striped" id="teamtable"
                               style="text-align: center">
                            <thead>
                            <tr>
                                <th style="text-align: center">组员ID</th>
                                <th style="text-align: center">组员</th>
                                <th style="text-align: center">用时(min)</th>
                                <th style="text-align: center">评分</th>
                                <th style="text-align: center">进行评价</th>
                            </tr>
                            </thead>
                            <tbody id="teamtablebody">
                            <tr ng-repeat="item in wpmagazine">
                                <td>{{item.stuIds}}</td>
                                <td>{{item.stuNames}}</td>
                                <td>{{item.totalTime}}</td>
                                <td>{{item.score}}</td>
                                <td>
                                    <button class='details'>详情</button>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div id="fenzu" style="display: none;" ng-controller="teamgrade">

            <script type="text/javascript">
                var stuNs = "";

                function addToTable() {

                    var stu1 = document.getElementById("s1");
                    var index1 = stu1.selectedIndex;
                    var stu1id = stu1.options[index1].value;
                    var stu1name = stu1.options[index1].text;

                    var stu2 = document.getElementById("s2");
                    var index2 = stu2.selectedIndex;
                    var stu2id = stu2.options[index2].value;
                    var stu2name = stu2.options[index2].text;

                    var newTr = document.getElementById("table1").insertRow();
                    var newTd1 = newTr.insertCell();
                    newTd1.innerText = stu1name;
                    var newTd2 = newTr.insertCell();
                    newTd2.innerText = stu2name;
                    if (stu1name == "") {
                        var newTd3 = newTr.insertCell();
                        newTd3.innerText = stu2id;
                        stuNs += stu2id + "_";
                    } else if (stu2name == "") {
                        var newTd3 = newTr.insertCell();
                        newTd3.innerText = stu1id;
                        stuNs += stu1id + "_";
                    } else {
                        var newTd3 = newTr.insertCell();
                        newTd3.innerText = stu1id + "|" + stu2id;
                        stuNs += (stu1id + "|" + stu2id) + "_";
                    }
                    var newTd4 = newTr.insertCell();
                    newTd4.innerHTML = '<button id="del" type="button"  class="btn btn-primary">删除</button>';
                }


                $("document").ready(function () {
                    $.getJSON("../Cgroup/group", function (result) {
                        $.each(result, function (i, field) {
                            $("#s1").prepend("<option value='" + field.id + "'>" + field.disname + "</option>");
                            $("#s2").prepend("<option value='" + field.id + "'>" + field.disname + "</option>");

                        });


                    });
                    $("body").on('click', '#del', function () {
                        $(this).parent().parent().remove()

                    })


                    $("#tijiao").click(function () {
                        var s = new Set();
                        console.log("tijiao")

                        $("#table1 tr td:nth-child(3)").each(function () {
                            //此处需转义
                            console.log($(this).text())
                            $.getJSON("../Group/insert?gruop=" + $(this).text().replace("|", "%7C"), function (result) {
                            })

                        });

                        /* 	$.getJSON("group/insert?gruop=", function(result) {

                                            $.each(result, function(i, field) {

                                        $("#tablequestion").append("<tr><td><input type='checkbox' id='td1' value="+field.id+">" + field.id + "</td><td>" + field.content +"</td></tr>");

                                    });


                                });	 */
                        alert("成功")

                    })
                })


            </script>
            <div id="page-wrapper">
                <div id="page-inner">
                    <div class="row">
                        <div class="col-md-12">
                            <h2>结对分组</h2>
                        </div>

                    </div>

                    <p id="p1">


                        <!-- /. ROW  -->
                    <hr/>
                    <div class="col-sm-offset-10 col-sm-2">
                        <input id="date" style="background: transparent; border: none;"
                               disabled="true" font-size:50px;"></input>
                    </div>

                    <div class="row" style="padding: 50px 0px 0px 0px" align="center">
                        <h3>
                            <font face="隶书" color="	">请 选 择 结 对 成 员</font>
                        </h3>
                        <p>
                            组员一:<select id="s1" style="width: 200px">

                            <option value=""></option>
                        </select>
                            组员二:<select id="s2" style="width: 200px">

                            <option value=""></option>

                        </select>
                    </div>

                    <div class="row" style="padding: 30px 0px 0px 125px">
                        <div class="col-sm-offset-5 col-sm-7">
                            <input type="button" id="b1" class="btn btn-primary"
                                   onclick="addToTable()" value="添加"/><br/>
                        </div>
                        <div class="row" style="padding: 30px 0px 0px 100px">
                            <div class="col-sm-offset-4 col-sm-8">
                                <font color="#FF0000">Tip:若需单人组队，一组员选空白</font><br/>
                            </div>
                        </div>
                    </div>

                    <div class="row" style="padding: 50px 0px 0px 0px">
                        <div class="table-responsive">
                            <table class="table table-striped" id="table1"
                                   style="text-align: center">
                                <thead>
                                <tr>
                                    <th style="text-align: center">组员1</th>
                                    <th style="text-align: center">组员2</th>
                                    <th style="text-align: center">组员id</th>
                                    <th style="text-align: center">删除</th>
                                </tr>
                                </thead>
                                <tbody>

                                </tbody>
                            </table>
                        </div>
                    </div>

                    <div class="row" style="padding: 30px 0px 0px 125px">
                        <div class="col-sm-offset-5 col-sm-7"ng-controller="fenzu">

                        <input type="button" class="btn btn-primary"
                                   id="fenzutijiao" value="提交" ng-click="fenzutijiao()"/>
                        </div>
                    </div>

                </div>
            </div>
        </div>


        <div id="Placement" style="display: none;" ng-controller="Placement">

            <div class="col-md-12">
                <h2>班级划分</h2>
            </div>
            <div class="col-md-12">
                <div class="col-md-6">
                    <select ng-model="finallyuser">
                        <option ng-repeat="us in users" value="{{us.id}}">{{us.name}}</option>
                    </select>
                </div>

                <div class="col-md-6">
                    <select ng-model="finallyclazz">
                        <option ng-repeat="cl in clazzs" value="{{cl.id}}">{{cl.name}}</option>
                    </select>
                </div>
            </div>
            <div class="col-md-12">
                <button ng-click="Placement()">确认分班</button>
            </div>
        </div>

    </div>
</div>
<!--三级div结束-->

</div>
</body>
</html>
